package liquidfs.ui.vfs;

public enum WindowsFileAttribute {
      
   ARCHIVE (0x20),
   COMPRESSED (0x800),
   DEVICE (0x40),
   DIRECTORY (0x10),
   ENCRYPTED (0x4000),
   HIDDEN (0x02),
   NORMAL (0x80),
   NOT_INDEXED (0x2000),
   OFFLINE (0x1000),
   READONLY (0x01),
   SPARSE (0x200),
   SYSTEM (0x04),
   TEMPORARY (0x100);
   
   private final int constant;
   
   private WindowsFileAttribute (int constant) {
      this.constant = constant;
   }
   
   public int getConstant () {
      return this.constant;
   }
   
   public static int combine (WindowsFileAttribute...attributes) {
      
      int combined = 0;
      
      for (WindowsFileAttribute attribute : attributes) {
         combined |= attribute.getConstant();
      }
      
      return combined;
      
   }
      
}
